﻿# coding:utf-8
import threading
import spider_downloader

class SpiderMain(object):
	def __init__(self):
		self.downloader = spider_downloader.SpiderDownloader()
	
	def category_url_list(self,root_url):
		
	
	def craw(self):
		pass
		


if __name__ == '__main__':
	root_url = 'http://www.mumayi.com/android/xitonggongju/'
	spider = SpiderMain()
	#获取分类url列表
	url_list = spider.category_url_list(root_url)
	threads = []
	for url in url_list:
		t = threading.Thread(target=spider.craw,args=(url,))
		threads.append(t)
	for t in threads:
		t.setDaemon(True)
		t.start()
	t.join()
	